<?php
namespace app\index\controller;
use think\Db;
class Ebusiness extends Base{
    public function ebusiness(){
    	$ebusiness=Db::name('ebusiness_banner')->where('id',1)->find();
        
        $ebusiness_characteristic_title=Db::name('ebusiness_characteristic_title')->where('id',1)->find();
        $ebusiness_characteristic=Db::name('ebusiness_characteristic')->order('sort desc')->select();
        $part_functions_title=Db::name('part_functions_title')->where('id',1)->find();
        $part_functions=Db::name('part_functions')->order('sort desc')->select();
        $e_teams_title=Db::name('e_teams_title')->where('id',1)->find();
        $e_teams=Db::name('e_teams')->order('sort desc')->select();
        foreach ($e_teams as $key => $value) {
            $e_teams[$key]['description']=json_decode($e_teams[$key]['description']);
        }
        $e_reason_title=Db::name('e_reason_title')->where('id',1)->find();
        $e_reason=Db::name('e_reason')->order('sort desc')->select();
        $e_solution=Db::name('e_solution')->order('sort desc')->select();
        foreach ($e_solution as $key => $value) {
            $e_solution[$key]['description']=json_decode($e_solution[$key]['description']);
        }

        $headquarters_branches=Db::name('headquarters_branches')->order('sort desc')->select();
        $others=Db::name('others')->where('state',1)->order('sort desc')->select();
        $cases=Db::name('cases')->where('type',4)->order('sort desc')->limit(6)->select();
        $this->assign('system_set',$this->system_set());
		$this->assign('ebusiness',$ebusiness);
        $this->assign('ebusiness_characteristic_title',$ebusiness_characteristic_title);
        $this->assign('ebusiness_characteristic',$ebusiness_characteristic);
        $this->assign('tmdurl',$this->request->domain());
        $this->assign('others',$others);
        $this->assign('part_functions_title',$part_functions_title);
        $this->assign('part_functions',$part_functions);
        $this->assign('e_teams_title',$e_teams_title);
        $this->assign('e_teams',$e_teams);
        $this->assign('e_reason_title',$e_reason_title);
        $this->assign('e_reason',$e_reason);
        $this->assign('e_solution',$e_solution);
        $this->assign('headquarters_branches',$headquarters_branches);
        $this->assign('cases',$cases);
        return $this->fetch();
    }
}
